import React from 'react'
import {Route,Link, Redirect} from 'react-router-dom'

import Hello from '@/components/child/hello'
import Hi from '@/components/child/hi'

export default class About extends React.Component {
  render() {
    console.log( this.props.match.params.username )
    return <div>
      <h3>关于</h3>
      <Link to="/about/hello">你好</Link>&nbsp;&nbsp;
      <Link to="/about/hi">她好</Link>

      <Route exact path="/about" render={()=><Redirect to="/about/hi"/>}></Route>
      <Route path="/about/hello" component={Hello}></Route>
      <Route path="/about/hi" component={Hi}></Route>
    </div>
  }
}